# class Digua:
#     def __init__(self):
#         self.zhuangtai = "生的"
#         self.cooktime = 0
#         self.tiaoliao = []
#
#     def cook(self, t):
#         self.cooktime += t
#         if 0 < self.cooktime < 3:
#             self.zhuangtai = "生的"
#         elif 3 < self.cooktime < 5:
#             self.zhuangtai = '半生不熟'
#         elif 5 < self.cooktime < 8:
#             self.zhuangtai = '熟了'
#         else:
#             self.zhuangtai = '糊了'
#         print('烤地瓜啊烤地瓜')
#
#     def add_tiaoliao(self, n):
#         self.tiaoliao.append(n)
#
#
#     def __str__(self):
#         return f'地瓜熟了用时{self.cooktime},状态为{self.zhuangtai},中途我放了{self.tiaoliao}'
# diguashule1 = Digua()
# diguashule1.add_tiaoliao("孜然")
# diguashule1.cook(7)
# print(diguashule1)
#
#
#
#
#
# class wash(object):
#     def water(self):
#         print('弹棉花啊弹棉花，半斤棉谈成八两八')
#
# class Xiyiji():
#     def xi(self):
#         print('洗衣服啊洗衣服')
#         print('我是self', self)
#
#     def print_info(self):
#         print(f"高度是{self.height}")
#         print(f"宽度是{self.width}")
#
#
#
# gelanshi1 = Xiyiji()
# print('gelanshi1',gelanshi1)
# gelanshi1.xi()
#
# haixin2=Xiyiji()
# print('我是海信2',haixin2)
# haixin2.xi()
# gelanshi1.width = 800
# gelanshi1.height = 900
# print(f'洗衣机的高度是{gelanshi1.height}')
# print(f'洗衣机的宽度是{gelanshi1.width}')
# # 在类内部调用属性
# gelanshi1.print_info()
#
# class Water:
#     def __init__(self,w,h):
#         self.wight=w
#         self.height=h
#         self.name='Water'
#     def wash(self):
#         print('我是一个self',self)
#         print('洗衣服')
#
#
#     def print_info(self):
#         print(f"高度是{self.height}")
#         print(f"宽度是{self.wight}")
#
#     def __str__(self):
#         return f"我是{self.name}的说明书"
#
# gelanshi1=Water(30,20)
# gelanshi1.print_info()
# # haixin2=Water(20,30)
# # haixin2.print_info()
# print(gelanshi1)
# del gelanshi1
#
#
